﻿//**************************************************************
//
// MoneyBaby Project - Open source payment processors for .NET
//
// Copyright 2007-2008 Marcus McConnell and BV Software
// www.CodePlex.com/MoneyBaby
//**************************************************************

using System;
using System.Collections.Generic;
using System.Text;

namespace BVSoftware.MoneyBaby
{
    /// <summary>
    /// Defines the basic functionality that all credit card gateways should implement
    /// </summary>
    public interface ICreditCardGateway<T> where T : PaymentGatewaySettings, new()
    {

        // generate a unique ID for your processor for this method
        Guid GatewayId { get; }

        // a user friendly display name for your gateway
        string GatewayName { get; }
        PaymentData<T> PaymentData { get; }

        // Use these properties to help out your users. Hide buttons
        // that your gateway doesn't support. No need to display a VOID
        // button to the user if they can't ever get a successful response.
        bool SupportsAuthorize { get; }
        bool SupportsCapture { get; }
        bool SupportsCharge { get; }
        bool SupportsRefund { get; }
        bool SupportsVoid { get; }

        // These methods do the real work of communicating with 
        // outside services based on the 
        TransactionResultData Authorize();
        TransactionResultData Capture();
        TransactionResultData Charge();
        TransactionResultData Refund();
        TransactionResultData Void();
    }

    /// <summary>
    /// Defines the basic functionality that all credit card gateways should implement
    /// </summary>
    public interface ICreditCardGateway
    {
        // generate a unique ID for your processor for this method
        Guid GatewayId { get; }

        // a user friendly display name for your gateway
        string GatewayName { get; }
        PaymentData<GenericPaymentGatewaySettings> PaymentData { get; }

        // Use these properties to help out your users. Hide buttons
        // that your gateway doesn't support. No need to display a VOID
        // button to the user if they can't ever get a successful response.
        bool SupportsAuthorize { get; }
        bool SupportsCapture { get; }
        bool SupportsCharge { get; }
        bool SupportsRefund { get; }
        bool SupportsVoid { get; }

        // These methods do the real work of communicating with 
        // outside services based on the 
        TransactionResultData Authorize();
        TransactionResultData Capture();
        TransactionResultData Charge();
        TransactionResultData Refund();
        TransactionResultData Void();
    }
}
